#ifndef _RETRO_TEXTUREPREVIEW
#define _RETRO_TEXTUREPREVIEW

namespace Retro
{
  namespace Creator
  {
    namespace GUI
    {
      class TexturePreview : public Control
      {
      private:
        Gdip::Rect          offset;
        Gdip::Bitmap*       texture;
        BOOL                grab;
        Geom::Point         grabPt;
        Geom::Point         ptMin;

      protected:
        virtual VOID  onControlPaint(Controls::ControlPaintEvent& iEvent);
        virtual VOID  onMouseDown(Event::MouseEvent& iEvent);
        virtual VOID  onMouseUp(Event::MouseEvent& iEvent);
        virtual VOID  onMouseMove(Event::MouseEvent& iEvent);
        virtual VOID  onMouseLeave();
        virtual VOID  onMouseEnter(Event::MouseEvent& iEvent);

      public:
        INL Gdip::Bitmap*   getTexture()
        {
          return texture;
        }
        VOID                setTexture(Gdip::Bitmap* value);

        TexturePreview();
        ~TexturePreview();
      };
    } // namespace GUI
  } // namespace Creator
} // namespace Retro

#endif